package tech.aistar.day03;

/**
 * 本类用来演示:
 *
 * @author: success
 * @date: 2021/3/8 11:12 上午
 */
public class SwtichAndIfDemo {
    public static void main(String[] args) {
        int n = 90;
        //[90-100] - 优秀
        //[80,90) - 良好
        //[70,80) - 中等
        //其余 -> 继续努力

        if(n>=90 && n<=100){
            System.out.println("优秀");
        }else if(n>=80){
            System.out.println("良好");
        }else if(n>=70){
            System.out.println("中等");
        }else{
            System.out.println("继续努力...");
        }
        System.out.println("========");

        n = n / 10;
        switch (n){
            case 9:
            case 10:
                System.out.println("优秀");
                break;
            case 8:
                System.out.println("良好");
                break;
            case 7:
                System.out.println("中等");
            default:
                System.out.println("继续努力");
                break;
        }

    }
}
